def reverseWords(s: str):
    tokens = s.split()
    tokens.reverse()
    return ' '.join(tokens)

print(reverseWords("I am a worker"))


class Solution(object):
    def rotateString(self, s, goal):
        if len(s) != len(goal):
            return False
        return goal in (s + s)


class Solution(object):
    def countPrefixes(self, words, s):
        count = 0
        for word in words:
            if s.startswith(word):
                count += 1
        return count

